<template>
  <div>
    <div class="step-progress">
      <div class="step-item completed"><span class="cicle">1</span></div>
      <div class="step-item active"><span class="cicle" :class="num==1?'ocp':''">2</span></div>
    </div>
    <div class="flex fs14 jcsb mgt10">
      <div class="mgl">填写基本信息</div>
      <div class="mgr">选择职位要求</div>
    </div>
  </div>
</template>
<style>
@import "../ui/vant-ui/ui.css";
@import "../public.css";
.step-progress {
  display: flex;
}

.step-item {
  flex: 1;
  text-align: center;
  position: relative;
}

.step-item::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -50%;
  width: 100%;
  height: 2px;
  background-color: #ccc;
  z-index: -100;
}

.step-item:first-child::before {
  display: none; /* 隐藏第一个步骤之前的线 */
}

.step-item.completed::before,
.step-item.active::before {
  background-color: var(--primary-color); /* 已完成和当前步骤的颜色 */
}

.step-item.completed + .step-item::before {
  background-color: var(--primary-color); /* 已完成步骤之后的线 */
}

.step-item.active {
  font-weight: bold; /* 当前步骤的样式 */
}
.cicle{
  font-size: .68rem;
  width: 10px;
  height: 10px;
  padding: 3px 5px;
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  color: #fff;
  z-index: 100;
  background-color: var(--primary-color);
}
.ocp{
  opacity: 0.5;
}
.mgl{
  margin-left: 60px;
}
.mgr{
  margin-right: 60px;
}
@media (min-width:500px){
  .mgl{
    margin-left: 170px;
  }
  .mgr{
    margin-right: 170px;
  }
}
</style>
<script>
module.exports = {
  name: "steps",
  props: ["num"],
};
</script>
